package com.hulk.dryad.manage.framework.lock.config;

import lombok.Data;
import lombok.experimental.Accessors;

import java.time.Duration;

/**
 * @author  hulk
 */
@Deprecated
@Data
@Accessors(chain = true)
//@ConfigurationProperties(prefix = LockdProperties.PREFIX)
public class LockdProperties {

     static final String PREFIX = "redisson.locked";
    //redisson
    private String host;
    private int  port ;
    private String password;
    private int database = 0;
    private Duration timeout;

    private ClusterServer clusterServer;
    private String codec = "org.redisson.codec.JsonJacksonCodec";


    public ClusterServer getClusterServer() {
        return clusterServer;
    }

    public void setClusterServer(ClusterServer clusterServer) {
        this.clusterServer = clusterServer;
    }

    public static class ClusterServer{

        private String[] nodeAddresses;

        public String[] getNodeAddresses() {
            return nodeAddresses;
        }

        public void setNodeAddresses(String[] nodeAddresses) {
            this.nodeAddresses = nodeAddresses;
        }
    }
}
